package com.hh.service.service.impl.integral;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hh.common.model.integral.IntegralOrderStatus;
import com.hh.common.utils.DateUtil;
import com.hh.service.dao.integral.IntegralOrderStatusDao;
import com.hh.service.service.integral.IntegralOrderStatusService;
import org.springframework.stereotype.Service;

@Service
public class IntegralOrderStatusServiceImpl extends ServiceImpl<IntegralOrderStatusDao, IntegralOrderStatus> implements IntegralOrderStatusService {
    @Override
    public Boolean createLog(Integer orderId, String type, String message) {
        IntegralOrderStatus storeOrderStatus = new IntegralOrderStatus();
        storeOrderStatus.setOid(orderId);
        storeOrderStatus.setChangeType(type);
        storeOrderStatus.setChangeMessage(message);
        storeOrderStatus.setCreateTime(DateUtil.nowDateTime());
        return save(storeOrderStatus);
    }
}
